package com.example.dormmanage.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("钥匙丢失登记实体类")
public class Loss {

    @ApiModelProperty("id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long lossId;

    @ApiModelProperty("楼宇id")
    private Integer buildingId;

    @ApiModelProperty("学生id")
    private Long studentId;

    @ApiModelProperty("钥匙丢失原因")
    private String reason;

    @ApiModelProperty("归还状态(1->未归还,2->已归还)")
    private Integer status;

    @ApiModelProperty("审核状态(1->通过,2->不通过)")
    private Integer checkStatus;

    @ApiModelProperty("预计归还时间")
    private String preBackTime;

    @ApiModelProperty("登记时间")
    private LocalDateTime uploadTime;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT,select = false)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime updateTime;
}
